<template>
  <div>
    <a-spin :spinning="loading">
      <a-row :gutter="20">
        <!-- 左侧信息展示 -->
        <a-col :span="11">
          <a-button type="dashed" @click="openUploader" style="width: 33%">
            <BlockOutlined />新建井
          </a-button>
          <a-button :disabled="schemesData === undefined" type="dashed" @click="openWrite('修改井')" style="width: 33%">
            <EditOutlined />修改井信息
          </a-button>
          <a-button :disabled="schemesData === undefined" type="dashed" @click="openTraject" style="width: 34%">
            <VerticalAlignTopOutlined />上传井斜数据
          </a-button>
          <!-- 信息栏 -->
          <a-collapse v-model:activeKey="activeKey" :bordered="false">
            <!-- 井基础信息 -->
            <a-collapse-panel key="1" header="当前井信息" :collapsible="activeAble">
              <p>
                <a-descriptions :column="2" title="" bordered>
                  <a-descriptions-item label="井名">{{ schemesData?.wellId || "xxx" }}</a-descriptions-item>
                  <a-descriptions-item label="井眼轨迹">
                    <a-button @click="download()" style="margin-left: -24px" type="link">下载</a-button>
                  </a-descriptions-item>
                  <a-descriptions-item :span="2" label="地理位置">
                    {{ schemesData?.wellLocation || "xxxxxx" }}
                  </a-descriptions-item>
                </a-descriptions>
              </p>
            </a-collapse-panel>
            <!-- 历史方案 -->
            <a-collapse-panel key="2" header="上传历史">
              <a-input-search v-model:value="wellKey" placeholder="请输井名信息" enter-button="搜索"
                style="width: 250px; margin-bottom: 10px" @search="searchScheme()" />
              <a-button style="margin-left: 10px" type="dashed" @click="resetScheme()">重置</a-button>
              <p>
                <a-table :dataSource="dataSource" :columns="fileColumns" bordered :pagination="false">
                  <template #bodyCell="{ column, text, record }">
                    <template v-if="column.dataIndex === 'action'">
                      <div style="margin-right: 8px">
                        <span>
                          <a-button type="link" @click="doSelect(record)">选取</a-button>
                          <AntdZh><a-popconfirm title="确定删除该条记录 ?" @confirm="doDelete(record)">
                              <a-button type="link" danger>删除</a-button>
                            </a-popconfirm></AntdZh>
                          <a-button type="link" @click="doWellHistory(record)">修改记录</a-button>
                        </span>
                      </div>
                    </template>
                  </template>
                </a-table>
                <br />
                <AntdZh>
                  <a-pagination v-model:current="query.pageNum" v-model:pageSize="query.pageSize" :total="total"
                    @change="getFileList" />
                </AntdZh>
              </p>
            </a-collapse-panel>
          </a-collapse>
          <!-- 信息录入抽屉 -->
          <DataDrawer :state="state" @getData="getData" @deliverData="deliverData" ref="dataDrawerRef"></DataDrawer>
        </a-col>
        <!-- 右侧可视化 -->
        <a-col :span="13">
          <el-card>
            <a-tabs v-model:activeKey="wellActiveKey">
              <a-tab-pane key="1" tab="井眼轨迹图">
                <div ref="chartContainer">
                  <EchartCanvas ref="lithologyRef" :echartsData="schemesData"></EchartCanvas>
                </div>
              </a-tab-pane>
              <a-tab-pane key="2" tab="井眼轨迹三维视图">
                <traject :data="schemesData"></traject>
              </a-tab-pane>
              <a-tab-pane key="3" tab="井眼轨迹数据">
                <SurveyData :value="surveyId" />
              </a-tab-pane>
              <template #rightExtra>
                <a-button type="dashed" style="width: 70%; margin-bottom: 10px;  " @click="openLithology">岩性选择</a-button>
                <a-button type="text" style="width: 10%; margin-bottom: 10px; margin-right: 0px; "
                  @click="getLithologyImg">
                  <EyeOutlined />
                </a-button>
              </template>
            </a-tabs>
          </el-card>
        </a-col>
      </a-row>

      <!-- 某个井的历史上传记录 -->
      <AntdConfirmModal :showConfirm="false" title="修改记录" ref="HistoryModalRef" width="600px">
        <HistoryTable :historyData="historyData" @getDetail="doSelect"></HistoryTable>
      </AntdConfirmModal>
      <!-- 导入文件（新建井）弹窗 -->
      <AntdConfirmModal title="导入井信息" ref="modalRef" width="600px" @confirm="submitForm">
        <a-form ref="formRef" :model="form" :label-col="{ span: 4 }">
          <a-row>
            <a-col :span="18" push="5">
              <a-button type="primary" style="width: 350px;" @click="openWrite('新建井')">切换为手动输入</a-button>
              <!-- <a-form-item label="数据类型">
                <a-tag style="height: 25px; width: 90px; font-size: 15px" color="#2db7f5">钻井收集卡</a-tag>
              </a-form-item> -->
            </a-col>
          </a-row>
          <a-divider />
          <a-row>
            <a-col :span="18" push="2">
              <a-form-item label="上传附件">
                <a-upload-dragger withCredentials v-model:fileList="fileList" style="width: 350px" name="file"
                  :before-upload="beforeUpload" @remove="handleRemove" :maxCount="1">
                  <p class="ant-upload-drag-icon">
                    <inbox-outlined></inbox-outlined>
                  </p>
                  <p class="ant-upload-text">点击或者拖拽文件到此处上传</p>
                </a-upload-dragger>
              </a-form-item>
            </a-col>
          </a-row>
          <a-row>
            <a-col :span="18" push="2">
              <a-form-item label="备注" name="remark">
                <a-textarea v-model:value="form.remark" style="width: 350px" placeholder="请输入备注信息" :rows="2" />
              </a-form-item>
            </a-col>
          </a-row>
        </a-form>
        <!-- <a-divider />
        <a-row>
          <a-col><a-button type="link" style="margin-left: 340px" @click="openWrite('新建井')">切换为手动输入</a-button></a-col>
          <a-col><a-button type="primary" @click="submitForm">导入</a-button></a-col>
        </a-row> -->
      </AntdConfirmModal>
      <!-- 导入井眼轨迹弹窗 -->
      <AntdConfirmModal :showConfirm="false" title="导入井眼轨迹数据" ref="trajectModalRef" width="600px" @confirm="submitForm">
        <a-form ref="formRef" :model="form" :label-col="{ span: 6 }">
          <a-row>
            <a-col :span="18">
              <a-form-item label="是否为直井" name="vertical">
                <a-switch v-model:checked="vertical" checked-children="是" un-checked-children="否" style="width: 100px;" />
              </a-form-item>
            </a-col>
          </a-row>
          <a-row v-if="!vertical">
            <a-col :span="18">
              <a-form-item label="上传附件">
                <a-upload-dragger withCredentials v-model:fileList="fileList" style="width: 350px" name="file"
                  :before-upload="beforeUpload" @remove="handleRemove" :maxCount="1">
                  <p class="ant-upload-drag-icon">
                    <inbox-outlined></inbox-outlined>
                  </p>
                  <p class="ant-upload-text">点击或者拖拽文件到此处上传</p>
                </a-upload-dragger>
              </a-form-item>
            </a-col>
            <a-col :span="18" push="2"><span style="color: rgb(4, 123, 2); font-size: 13px">(注意：文件格式为excel类型文件)</span></a-col>
            <a-col :span="18" push="2"><span style="color: rgb(4, 123, 2); font-size: 13px">(注意：文件内容请严格按照，第一列为井深，第二列为井斜角，第三列为方位角！)</span></a-col>
          </a-row>
          <a-row v-if="vertical">
            <a-col :span="18">
              <a-form-item label="直井井深">
                <a-input-number v-model:value="vertData.deep" style="width: 250px" placeholder="请输入直井井深" :min="0"
                  addon-after="m" />
              </a-form-item>
            </a-col>
          </a-row>
          <!-- <a-row>
          <a-col :span="18">
            <a-form-item label="备注" name="remark">
              <a-textarea v-model:value="form.remark" style="width: 350px" placeholder="请输入备注信息" :rows="2" />
            </a-form-item>
          </a-col>
        </a-row> -->
        </a-form>
        <a-divider />
        <a-row>
          <a-col>
            <a-button type="primary" style="margin-left: 400px" @click="submitForm">导入</a-button>
          </a-col>
        </a-row>
      </AntdConfirmModal>
      <!-- 造斜 -->
      <!-- <AntdConfirmModal title="添加造斜数据" ref="obliqueModalRef" width="700px" :showConfirm="false">
        <ObliqueTable :obliqueData="obliqueData" @getOblique="getOblique"></ObliqueTable>
      </AntdConfirmModal> -->

      <AntdConfirmModal title="填写数据" ref="modalEditRef" width="700px" @confirm="submitForm">
        <a-form layout="inline">
          <a-form-item label="Form Layout"><a-input v-model:value="geologyForm.name"
              placeholder="input placeholder" /></a-form-item>
          <a-form-item label="Form Layout"><a-input v-model:value="geologyForm.name"
              placeholder="input placeholder" /></a-form-item>
          <a-form-item label="Form Layout"><a-input v-model:value="geologyForm.name"
              placeholder="input placeholder" /></a-form-item></a-form>
      </AntdConfirmModal>

      <!-- 岩性选择弹窗 -->
      <AntdConfirmModal title="岩性选择" ref="modalLithologyRef" width="620px" @confirm="submitLithology">
        <a-form :model="formLithology">
          <a-space v-for="(item, index) in dynamicValidateForm.formLithology" :key="item.lithologyId"
            style="display: flex; margin-bottom: 8px" align="baseline">
            <a-form-item label="岩性信息" :name="['formLithology', index, , 'end', 'start']">
              <a-input-group style="width: 620px" compact>
                <a-select show-search @change="lithologySelect(item)" v-model:value="item.lithologyName"
                  style="width: 160px" :filter-option="filterOption">
                  <a-select-option v-for="i of lithologyData" :value="i.id" :key="i">
                    {{ i.lithologyName }}</a-select-option>
                </a-select>
                <a-input-number v-model:value="item.start" class="site-input-right"
                  style="width: 120px; text-align: center" placeholder="起始深度(m)" :min="1" />
                <a-input v-model:value="value13" class="site-input-split" style="width: 30px; pointer-events: none"
                  placeholder="~" disabled />
                <a-input-number v-model:value="item.end" class="site-input-right" style="width: 120px; text-align: center"
                  placeholder="终点深度(m)" :min="1" />
                <a-button style=" margin-left:10px; width: 80px" class="dynamic-delete-button" type="dashed" block
                  @click="removeDomain(item)">删除</a-button>
              </a-input-group>
            </a-form-item>
          </a-space>
          <a-button type="dashed" style="width: 100%" block @click="addDomain">
            <PlusOutlined />添加岩性
          </a-button>
        </a-form>
      </AntdConfirmModal>
    </a-spin>
  </div>
</template>
<script setup>
import doc from "@/assets/images/doc.png";
import xsl from "@/assets/images/xsl.png";
import html2canvas from "html2canvas";
import request from "@/utils/request";
import EchartCanvas from "./echarts.vue";
import { InboxOutlined, EditOutlined, BlockOutlined, EyeOutlined, VerticalAlignTopOutlined } from "@ant-design/icons-vue";
import { message, Upload } from "ant-design-vue";
import DesignScheme from '@/api/design/schemes.js'
import GeoLithologies from "@/api/geo/lithology.js";//岩性api
import WellSurvey from "@/api/survey/survey.js";
import WellAnalysis from '@/api/v3/mechanical.js' //py计算接口
import { getFile } from "@/api/file/file.js";
import { identity } from "lodash-es";
// import ObliqueTable from './type/ObliqueTable.vue' //造斜
import HistoryTable from './type/HistoryTable.vue' //历史上传记录
import traject from "@/custom/well/pages/list/components/traject"
import DataDrawer from "./drawer/DataDrawer";
import SurveyData from '@/custom/well/pages/list/components/survey/data'
import { WellDatas } from '@/custom/salvage/constant/address.js'  //新建井判断
import useApp from "@/hooks";
const { $, proxy } = useApp();
const activeKey = ref(['1']);
const activeAble = ref("icon");
const dynamicValidateForm = reactive({
  formLithology: [],
});
const geologyForm = ref({
  name: "XXX",
});
const fileColumns = [
  {
    title: "名称",
    dataIndex: "wellId",
    key: "wellId",
  },
  {
    title: "上传时间",
    dataIndex: "updatedTime",
    key: "updatedTime",
  },
  {
    title: "操作",
    dataIndex: "action",
    key: "action",
  },
];
const wellActiveKey = ref('1');
const surveyId = ref()
const schemesData = ref(undefined);
const chartContainer = ref(null);
const file = ref();
const data = ref([]);
const dataSource = ref([]);
const formRef = ref(null);
const modalRef = ref(null);
const trajectModalRef = ref(null);
const modalEditRef = ref(null);
const modalLithologyRef = ref(null);
const HistoryModalRef = ref(null);
const lithologyRef = ref(null);
const total = ref(1);
const wellKey = ref("");
const form = ref({
  file: null,
  bucketName: "importPre",
  remark: "",
});
const historyData = ref([])
// const obliqueModalRef = ref(null) //造斜
// const obliqueData = ref([])
// const oblique = ref({
//   id: '',
//   data: {}
// })
const lithologyData = ref([]);
const vertical = ref(false) //是否是直井
const vertData = ref({
  deep: '',
  wellId: '',
  remark: ''
})
const emit = defineEmits(["getCurrent"]);
const query = ref({
  order: "DESC",
  pageNum: 1,
  pageSize: 6,
  sortBy: "id",
  searchKey: '',
  wellId: "",
});
const queryParams = ref({
  order: "DESC",
  pageNum: 1,
  pageSize: 999,
  sortBy: "id",
});
// const isAddPoint = ref(false)
const fileList = ref([]);
const type = ref("drilling");
const dataDrawerRef = ref(null);
const state = ref(null);
const loading = ref(false)
function openUploader() {
  type.value = "drilling";
  modalRef.value.openModal();
}
function openTraject() {
  type.value = "locus";
  trajectModalRef.value.openModal();

  // 删除测井记录
  WellAnalysis.delSurvey(localStorage.getItem("wellId")).then((res) => {
    console.log("当前井测井记录已清空");
  });
}
function openWrite(name) {
  state.value = name;
  dataDrawerRef.value.openDrawer();
  modalRef.value.closeModal();
}
// 打开岩性弹窗
function openLithology() {
  let schemeId = localStorage.getItem("schemeId");
  DesignScheme.getDataOne(schemeId).then(res => {
    dynamicValidateForm.formLithology = res.wellLithologyList
  })
  modalLithologyRef.value.openModal();
}
// 添加岩性
function addDomain() {
  const time = new Date().getTime() + Math.random().toString(36).substr(2);
  if (dynamicValidateForm.formLithology == null) {
    dynamicValidateForm.formLithology = []
  }
  dynamicValidateForm.formLithology.push({
    start: 1,
    end: 1,
    lithologyName: "",
    lithologyFile: "",
    lithologyId: time
  });
}

// 方案选取
function doSelect(e) {
  HistoryModalRef.value.closeModal();
  console.log("方案选取", e);
  localStorage.setItem("schemeId", e.id);
  localStorage.setItem("wellId", e.wellId);
  let querySurvey = { order: "DESC", pageNum: 1, pageSize: 10, sortBy: "id", wellId: "" };
  querySurvey.wellId = e.wellId;
  WellSurvey.queryList(querySurvey).then((response) => {
    console.log("getSurveyData", response);
    if (response.content.length != 0) {
      console.log("测井记录不为空");
      localStorage.setItem("fileId", response.content[0].id);
      localStorage.setItem("isVertical", response.content[0].remark);
      localStorage.setItem("isAddPoint", response.content[0].skew)
    } else {
      $.showToast({
        title: "测井记录为空",
        icon: "warn",
      });
      localStorage.setItem("fileId", undefined);
      localStorage.setItem("isVertical", '定向井');
      localStorage.setItem("isAddPoint", false)
    }
  });
  getData();
  judgeColla();
}
// 方案删除
function doDelete(obj) {
  // console.log('obj', obj);
  let queryHistory = { order: "DESC", pageNum: 1, pageSize: 99999, sortBy: "createdTime", wellId: obj.wellId }
  DesignScheme.queryList(queryHistory).then(res => {
    let wellHisList = res.content
    $.showToast({
      title: '删除成功',
      icon: 'success'
    })
    wellHisList.forEach(element => {
      DesignScheme.deleteOne(element.id).then(res => {
        getFileList()
      })
    });
  })

}
const beforeUpload = (file) => {
  // 记录文件
  form.value.file = file;

  // const isExcel = file.type === 'application/vnd.ms-excel'
  if (
    file.type !== "application/vnd.ms-excel" &&
    file.type !== "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  ) {
    $.showToast({
      title: "只支持上传excel文件",
      icon: "error",
    });
    return false;
  }
  // return isExcel || Upload.LIST_IGNORE;
  return true;
  // 直接停止上传
  // return false;
};
// 移除文件
const handleRemove = (file) => {
  // const index = form.value.file.indexOf(file);
  // const newfile = form.value.file.slice();
  // newfile.splice(index, 1);
  // form.value.file = newfile;
  form.value.file = {};
};
// 井眼轨迹下载
const download = () => {
  let data = {
    order: "DESC",
    pageNum: 1,
    pageSize: 1,
    sortBy: "createdTime",
    wellId: localStorage.getItem("wellId"),
  };
  WellSurvey.queryList(data).then((res) => {
    file.value = res.content[0];
    window.open(`/dev-api/ufs/download/${file.value.dataId}`);
  });
  //    window.open(`http://wellb.apisev.cn/ufs/download/${fileId}`);
};
function judgeColla() {
  let schemeId = localStorage.getItem("schemeId");
  if (!schemeId) {
    activeAble.value = "disabled";
    activeKey.value = ["2"];
  } else {
    activeAble.value = "icon";
    activeKey.value = ["1"];
  }
}
judgeColla();

// 获取历史方案列表
function getFileList() {
  DesignScheme.getOneList(query.value).then((res) => {
    console.log("方案列表", res);
    dataSource.value = res.content;
    total.value = res.totalElements;
  });
}
getFileList();
// 查看特定井的历史记录
function doWellHistory(e) {
  let queryHistory = { order: "DESC", pageNum: 1, pageSize: 99999, sortBy: "createdTime", wellId: e.wellId }
  DesignScheme.queryList(queryHistory).then(res => {
    console.log('历史记录', res);
    historyData.value = res.content
    HistoryModalRef.value.openModal();
  })
}
// 历史方案搜索
function searchScheme() {
  query.value.searchKey = wellKey.value;
  getFileList();
}
/** 历史方案表单重置 */
function resetScheme() {
  wellKey.value = "";
  query.value = { order: "DESC", pageNum: 1, pageSize: 6, sortBy: "id", searchKey: '', wellId: "" }
  getFileList();
}

// 获取井信息
function getData() {
  let schemeId = localStorage.getItem("schemeId");
  // console.log('schemeId', schemeId);
  if (schemeId) {
    DesignScheme.getDataOne(schemeId).then((res) => {
      console.log('井信息', res);
      schemesData.value = res;
      getLastSurvey(res.wellId)
    }).catch((e) => {
      console.log('获取井信息', e);
    });
  }
}
getData();
// 获取最新测井记录
function getLastSurvey(wellId) {
  console.log('wellId', wellId);
  WellSurvey.latestSurvey(wellId).then(res => {
    console.log('getLastSurvey', res);
    localStorage.setItem("isAddPoint", res.skew)
    surveyId.value = res.id
  }).catch((e) => {
    console.log('最新测井', e);
  });
}

// 获取文件列表
function getList() {
  getFile(query.value).then((res) => {
    data.value = res.content;
  });
}
getList();
// 获取岩性信息
function getLithology() {
  GeoLithologies.queryList(queryParams.value).then((res) => {
    // console.log("岩性列表", res.content);
    lithologyData.value = res.content;
  });
}
getLithology();

const filterOption = (input, option) => {
  console.log("filterOption", input, option);
  return option.key.lithologyName.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};

// 提交
function submitForm() {
  const formData = new FormData();
  loading.value = true
  if (type.value === "locus") {
    // 井眼轨迹
    if (vertical.value) {
      form.value.remark = '直井'
      vertData.value.wellId = localStorage.getItem("wellId")
      vertData.value.remark = '直井'
      // console.log('vertData.value', vertData.value);
      WellSurvey.CreateVert(vertData.value).then(vert => {
        console.log('vert', vert);
        localStorage.setItem("fileId", vert.id);
        localStorage.setItem("isVertical", vert.remark);
        localStorage.setItem("isAddPoint", vert.skew);
      })
    } else {
      form.value.remark = '定向井'
      formData.append("file", form.value.file);
      formData.append("remark", form.value.remark);
      formData.append("wellId", localStorage.getItem("wellId"));
      request.post("/well/survey/import", formData, {
        headers: {
          "Content-Type": "multipart/form-data",
        },
      }).then((res) => {
        console.log("locus", res);
        localStorage.setItem("fileId", res.id);
        localStorage.setItem("isVertical", res.remark);
        localStorage.setItem("isAddPoint", res.skew);
        // WellSurvey.queryOne(res.id).then(response => {
        //   // 造斜
        //   if ((response[1].depth - response[0].depth >= 200 || response[0].depth >= 200) && res.remark == '定向井') {
        //     oblique.value.id = res.id
        //     isAddPoint.value = true
        //     let surData = { id: res.id, skew: isAddPoint.value }
        //     WellSurvey.updateSurOne(surData).then(e => {
        //       console.log('更新', e);
        //       loading.value = false
        //       $.showToast({
        //         title: "由于井起始深度大于200m，需要输入造斜信息",
        //         icon: "warn",
        //       });
        //       localStorage.setItem("isAddPoint", isAddPoint.value)
        //       obliqueData.value[0] = response[0]
        //       obliqueData.value[1] = response[1]
        //       obliqueData.value[2] = response[2]
        //       obliqueModalRef.value.openModal();
        //     })
        //   } else {
        //     isAddPoint.value = false
        //     localStorage.setItem("isAddPoint", isAddPoint.value)
        //     loading.value = false
        //     $.showToast({
        //       title: "上传成功",
        //       icon: "success",
        //     });
        //     getData();
        //     getList();
        //     getFileList();
        //     judgeColla();
        //   }
        // })
      });
    }
    loading.value = false
    $.showToast({
      title: "上传成功",
      icon: "success",
    });
    getData();
    getList();
    getFileList();
    judgeColla();
    trajectModalRef.value.closeModal();
  } else if (type.value === "drilling") {
    // 新建井
    const formData = new FormData();
    formData.append("file", form.value.file);
    request.post("/design/schemes/template", formData, {
      headers: {
        "Content-Type": "multipart/form-data",
      },
    }).then((res) => {
      // console.log("submitForm-drilling", res);
      // localStorage.setItem("schemeId", res.id);
      // localStorage.setItem("wellId", res.wellId);
      $.showToast({
        title: "上传成功",
        icon: "success",
      });
      WellDatas(res.id, res.wellId);
      getData();
      getList();
      getFileList();
      judgeColla();
      modalRef.value.closeModal();
    });
  }
}
// 造斜
// function getOblique(e) {
//   oblique.value.data = e
//   if (oblique.value.data?.depth == 0) {
//     $.showToast({
//       title: "请输入造斜信息",
//       icon: "warn",
//     });
//   } else {
//     WellSurvey.addSkew(oblique.value).then(res => {
//       $.showToast({
//         title: "造斜数据添加成功",
//         icon: "success",
//       });
//       getData();
//       getList();
//       getFileList();
//       judgeColla();
//       obliqueModalRef.value.closeModal();
//     })
//   }
// }
// 岩性选择变化
function lithologySelect(item) {
  GeoLithologies.getOne(item.lithologyName).then(res => {
    item.lithologyFile = res.lithologyFile;
  })
}
// 岩性弹窗提交
function submitLithology() {
  modalLithologyRef.value.closeModal();
  let schemeId = localStorage.getItem("schemeId");
  let params = { wellLithologyList: dynamicValidateForm.formLithology }
  DesignScheme.updateOne(schemeId, params).then(res => {
    console.log('岩性update', res);
    // localStorage.setItem("schemeId", res.id)
    lithologyRef.value.getLithList(res.wellLithologyList)
  })
}
function getLithologyImg() {
  let schemeId = localStorage.getItem("schemeId");
  DesignScheme.getDataOne(schemeId).then(res => {
    lithologyRef.value.getLithList(res.wellLithologyList)
  })
}
// 移除岩性
function removeDomain(item) {
  let index = dynamicValidateForm.formLithology.indexOf(item);
  if (index !== -1) {
    dynamicValidateForm.formLithology.splice(index, 1);
  }
}
// 新建/修改井提交
function deliverData(data) {
  // console.log("data", data);
  schemesData.value = data;
}
</script>
<style scoped>
.tabs-extra-demo-button {
  margin-right: 16px;
}

.ant-row-rtl .tabs-extra-demo-button {
  margin-right: 0;
  margin-left: 16px;
}
</style>